<template>
  <el-dialog title="新增学生" :visible.sync="dialogFormVisible" class="dialog">
    <el-form :model="form">
      <el-form-item label="名字" :label-width="formLabelWidth">
        <el-input v-model="form.name" autocomplete="off"></el-input>
      </el-form-item>
      <el-form-item label="年龄" :label-width="formLabelWidth">
        <el-input v-model="form.age" autocomplete="off"></el-input>
      </el-form-item>
      <el-form-item label="地址" :label-width="formLabelWidth">
        <el-input v-model="form.address" autocomplete="off"></el-input>
      </el-form-item>
      <el-form-item label="手机" :label-width="formLabelWidth">
        <el-input v-model="form.phone" autocomplete="off"></el-input>
      </el-form-item>
      <el-form-item label="身份证" :label-width="formLabelWidth">
        <el-input v-model="form.selfCard" autocomplete="off"></el-input>
      </el-form-item>
      <el-form-item label="是否独生" :label-width="formLabelWidth">
        <el-radio v-model="radio" label="1">独生</el-radio>
        <el-radio v-model="radio" label="0">非独生</el-radio>
      </el-form-item>
      <el-form-item label="是否接种" :label-width="formLabelWidth">
        <el-radio v-model="radio2" label="1">接种</el-radio>
        <el-radio v-model="radio2" label="0">未接种</el-radio>
      </el-form-item>
      <el-form-item label="户口所在地" :label-width="formLabelWidth">
        <el-select v-model="form.region" placeholder="户口所在地">
          <el-option label="农村户口" value="shanghai"></el-option>
          <el-option label="城市户口" value="beijing"></el-option>
        </el-select>
      </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button @click="dialogFormVisible = false">取 消</el-button>
      <el-button type="primary" @click="add()" >确 定</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  name: 'dialog-page',
  props: {},
  data: function () {
    return {
      message: 'dialog',
      dialogFormVisible:false,
    }
  },
  methods: {
    openDialog() {
      this.dialogFormVisible=true

    },
    toggleSelection(rows) {
      if (rows) {
        rows.forEach(row => {
          this.$refs.multipleTable.toggleRowSelection(row);
        });
      } else {
        this.$refs.multipleTable.clearSelection();
      }
    },
  }
}
</script>

<style scoped>
</style>

